--/ Startup local players = game:GetService("Players") local ds = game:GetService("Debris") -- Player local player = players.tankutanka -- Audio local magic = {3750959498, 3750959107, 4299509575, 4299510555} local rock = {12520435981, 12520436950, 12520437699, 12520438688} local boom = {8865674531, 8865674713} local call = {12521144232} -- FX local boomFrames = { Vector2.new(0, 0), Vector2.new(64, 0), Vector2.new(128, 0), Vector2.new(192, 0), Vector2.new(256, 0), Vector2.new(320, 0), Vector2.new(384, 0), Vector2.new(448, 0), Vector2.new(0, 96), Vector2.new(64, 96), Vector2.new(128, 96), Vector2.new(192, 96), Vector2.new(256, 96), Vector2.new(320, 96), Vector2.new(384, 96), Vector2.new(448, 96), Vector2.new(0, 192), Vector2.new(64, 192), Vector2.new(128, 192), Vector2.new(192, 192), Vector2.new(256, 192), Vector2.new(320, 192), Vector2.new(384, 192), Vector2.new(448, 192), Vector2.new(0, 288), Vector2.new(64, 288), Vector2.new(128, 288), Vector2.new(192, 288) } -- General local rng = Random.new() --/ Functions local victimFunctions = {} local function playSound(parent, snd_id, snd_vol, snd_pitch, snd_loops) local new_snd = Instance.new("Sound", parent) new_snd.SoundId = "rbxassetid://"..snd_id new_snd.Volume = snd_vol or 1 new_snd.Pitch = snd_pitch or 1 new_snd.Looped = snd_loops or false new_snd:Play() if not snd_loops then ds:AddItem(new_snd, 10) end end local ragdoll_joints = { -- UpperLimit, LowerTwistLimit, UpperTwistLimit, CollideSize, CollideOffset -- R6 ["Neck"] = {45, -45, 45}, ["Arm"] = {90, -35, 120, Vector3.new(0.6, 0.6, 0.6)}, ["Leg"] = {25, -90, 90, Vector3.new(0.6, 0.6, 0.6)}, -- R15 -- ["UpperTorso"] = {nil, -5, 5, nil, nil, true}, ["UpperArm"] = {90, -35, 120, Vector3.new(0.6, 0.6, 0.6)}, ["LowerArm"] = {2.5, 0, 120, Vector3.new(0.8, 0.4, 0.8), CFrame.new(0, -0.6, 0)}, ["Hand"] = {5, -5, 5}, ["UpperLeg"] = {25, -90, 90, Vector3.new(0.8, 0.6, 0.8)}, ["LowerLeg"] = {5, -90, 0, Vector3.new(0.8, 0.4, 0.8), CFrame.new(0, -0.6, 0)}, ["Foot"] = {5, -5, 5} } victimFunctions["ragdoll"] = function(target, joint) -- Finding character, verifying it exists local newChar = target.Character if not newChar then return end -- Audio if newChar:FindFirstChild("HumanoidRootPart") then playSound(newChar.HumanoidRootPart, 342472444, 1.75, rng:NextNumber(1.6, 1.8)) end -- Preventing target from falling apart on death local newHum = newChar:FindFirstChildOfClass("Humanoid") if newHum then newHum.BreakJointsOnDeath = false newHum.RequiresNeck = false newHum.PlatformStand = true end -- Disabling joints, creating ragdoll constraints for i, v in pairs(newChar:GetDescendants()) do -- Checking if descendant is a joint/motor if v:IsA("Motor") and not v.Part1:FindFirstChild("GKRRagConstraint") and ((joint and v.Part1.Name == joint) or (not joint and v.Name ~= "RootJoint" and v.Name ~= "Root Hip" and v.Name ~= "Root" and v.Name ~= "Waist")) then -- Creating ragdoll attachments local rag_att0 = Instance.new("Attachment", v.Part0) rag_att0.Position = v.C0.Position rag_att0.Name = "GKRRagAtt0" local rag_att1 = Instance.new("Attachment", v.Part1) rag_att1.WorldPosition = rag_att0.WorldPosition rag_att1.Name = "GKRRagAtt1" -- Retrieving joint data, if any local joint_data = ragdoll_joints[(((v.Part1.Name:gsub(" ", "")):gsub("Left", "")):gsub("Right", ""))] -- Creating ragdoll constraint local rag_hinge = Instance.new("BallSocketConstraint", v.Part1) rag_hinge.LimitsEnabled = true rag_hinge.UpperAngle = (if joint_data and joint_data[1] then joint_data[1] else 45) rag_hinge.TwistLimitsEnabled = true rag_hinge.TwistLowerAngle = (if joint_data and joint_data[2] then joint_data[2] else -45) rag_hinge.TwistUpperAngle = (if joint_data and joint_data[3] then joint_data[3] else 45) rag_hinge.Attachment0 = rag_att0 rag_hinge.Attachment1 = rag_att1 rag_hinge.Name = "GKRRagConstraint" -- Creating ragdoll collider if not v.Part1.CanCollide then local rag_collide = Instance.new("Part") rag_collide.Transparency = 1 rag_collide.CanCollide = true rag_collide.Massless = true rag_collide.Size = v.Part1.Size * (if joint_data and joint_data[4] then joint_data[4] else 0.8) rag_collide.Name = "GKRRagCollide" local rag_weld = Instance.new("Weld", rag_collide) rag_weld.Part0 = v.Part1 rag_weld.Part1 = rag_collide if joint_data and joint_data[5] then rag_weld.C0 = CFrame.new(joint_data[5].X * rag_collide.Size.X, joint_data[5].Y * rag_collide.Size.Y, joint_data[5].Z * rag_collide.Size.Z) end rag_collide.Parent = v.Part1 end -- Disabling motor v.Enabled = false if joint then break end end end end victimFunctions["unragdoll"] = function(target) -- Finding character, verifying it exists local newChar = target.Character if not newChar then return end -- Audio if newChar:FindFirstChild("HumanoidRootPart") then playSound(newChar.HumanoidRootPart, 342472438, 1.75, rng:NextNumber(1.6, 1.8)) end -- Removing ragdoll constraints for i, v in pairs(newChar:GetDescendants()) do if v:IsA("Motor") then v.Enabled = true end if string.find(v.Name, "GKRRag") then v:Destroy() end end -- Resetting humanoid settings local newHum = newChar:FindFirstChildOfClass("Humanoid") local newRoot = newChar:FindFirstChild("HumanoidRootPart") if newHum then if newRoot then newRoot.Position += Vector3.new(0, 2.5 + newHum.HipHeight, 0) newRoot.Orientation = Vector3.new(0, 0, 0) end newHum.BreakJointsOnDeath = true newHum.RequiresNeck = false newHum.PlatformStand = false end end victimFunctions["rock"] = function(target) -- Finding character, verifying it exists local newChar = target.Character if not newChar then return end -- Audio if newChar:FindFirstChild("Head") then playSound(newChar.Head, magic[rng:NextInteger(1, #magic)], 2, rng:NextNumber(0.9, 1.2)) playSound(newChar.Head, rock[rng:NextInteger(1, #rock)], 1.5, rng:NextNumber(0.9, 1.2)) end -- Indexing target's limbs for i, v in pairs(newChar:GetDescendants()) do -- Soldering joints if v:IsA("Motor") or v:IsA("Weld") then local newWeld = Instance.new("WeldConstraint", v.Parent) newWeld.Part0 = v.Part0 newWeld.Part1 = v.Part1 v:Destroy() end -- Rockifying parts if v:IsA("BasePart") then v.Transparency = 0 v.Material = "Slate" v.Color = Color3.fromRGB(163, 162, 165) v.Parent = workspace v.CanCollide = true end -- Rockifying meshes if v:IsA("SpecialMesh") and v.MeshType ~= "Head" then v.TextureId = "rbxassetid://5690158794" end -- Removing decals/textures if v:IsA("Decal") or v:IsA("Texture") or v.Name == "HumanoidRootPart" then v:Destroy() end -- Idle audio if v.Name == "Head" and rng:NextInteger(1, 12) == 1 then if rng:NextInteger(1, 5) == 1 then playSound(v, 12521142627, 0.5, (if rng:NextInteger(1, 2) == 1 then 1 else 0.963), true) else playSound(v, call[rng:NextInteger(1, #call)], 0.5, 1, true) end end end -- Respawning target if they haven't already task.wait(3) if not target.Character then target:LoadCharacter() end end victimFunctions["explode"] = function(target) -- Finding character, root, verifying both exist local newChar = target.Character if not newChar or not newChar:FindFirstChild("HumanoidRootPart") then return end local root = newChar.HumanoidRootPart -- Audio playSound(root, boom[rng:NextInteger(1, #boom)], 2.5, 1) -- Explosion effect local boomAtt = Instance.new("Attachment", workspace.Terrain) boomAtt.Position = root.Position + Vector3.new(0, 3, 0) local boomGui = Instance.new("BillboardGui", boomAtt) boomGui.Size = UDim2.new(12, 0, 12, 0) local boomImg = Instance.new("ImageLabel", boomGui) boomImg.BackgroundTransparency = 1 boomImg.ResampleMode = "Pixelated" boomImg.ScaleType = "Crop" boomImg.Size = UDim2.new(1, 0, 1, 0) boomImg.Image = "rbxassetid://12520727058" boomImg.ImageRectSize = Vector2.new(64, 128) coroutine.resume(coroutine.create((function() for frame = 1, #boomFrames do boomImg.ImageRectOffset = boomFrames[frame] task.wait(0.05) end boomAtt:Destroy() end))) -- Killing target root.Parent:BreakJoints() end victimFunctions["smite"] = function(target) -- Finding character, verifying it exists local newChar = target.Character if not newChar then return end -- The rest end victimFunctions["respawn"] = function(target) -- Respawning player target:LoadCharacter() end victimFunctions["template"] = function(target) -- Finding character, verifying it exists local newChar = target.Character if not newChar then return end -- The rest end local findPlayer = function(name) -- Lowering name name = name:lower() -- Finding matching player for i, plr in ipairs(players:GetPlayers()) do --if string.match(plr.Name:lower(), name) then -- Not good because it can pick it out from anywhere in the name if string.sub(plr.Name:lower(), 1, name:len()) == name then return plr end end end local chatted = function(msg) -- Cutting off '/e', splitting message if msg:sub(1, 3) == "/e " then msg = msg:sub(4) end msg = msg:lower(); msg = string.split(msg, "/") -- Could probably use string.format() for this but SNOOOORE -- Interpreting message if #msg >= 2 then -- Applying to all players if so chosen if msg[2] == "all" then for i, newPlayer in ipairs(players:GetPlayers()) do -- Finding target player, skipping to next target if not found local target = newPlayer; if not victimFunctions[msg[1]] or not target then continue end victimFunctions[msg[1]](target) end return end -- Applying to chosen players for i = 2, #msg do -- Finding target player, skipping to next target if not found local target = findPlayer(msg[i]); if msg[i] == "" or not victimFunctions[msg[1]] or not target then continue end victimFunctions[msg[1]](target) end end end --/ Events, Loops player.Chatted:Connect(chatted)